SlrScenariosModel

config.SlrScenariosModel()

The accepted input for the variable slr_scenarios.

Attributes

file : str

The path to the sea level rise scenarios file.

relative_to_year : int

The year to which the sea level rise scenarios are relative.

Methods

Name Description
interp_slr Interpolate SLR value and reference it to the SLR reference year from the site toml.
plot_slr_scenarios Plot sea level rise scenarios.

interp_slr

config.SlrScenariosModel.interp_slr(
    scenario: str,
    year: float,
    units: us.UnitTypesLength = us.UnitTypesLength.meters,
)

Interpolate SLR value and reference it to the SLR reference year from the site toml.

Parameters

scenario : str

SLR scenario name to use from the column names in self.file

year : float

year to evaluate

units : us.UnitTypesLength = = us.UnitTypesLength.meters

The units to convert the SLR value to. Default is meters.

Returns

: float

The interpolated sea level rise value in the specified units, relative to the reference year.

Raises

: ValueError

if the reference year is outside of the time range in the slr.csv file

: ValueError

if the year to evaluate is outside of the time range in the slr.csv file

plot_slr_scenarios

config.SlrScenariosModel.plot_slr_scenarios(
    scenario_names: list[str],
    output_loc: Path,
    units: us.UnitTypesLength = us.UnitTypesLength.meters,
)

Plot sea level rise scenarios.

Returns

html_path : str

The path to the html plot of the sea level rise scenarios.

Back to top